package org.mca.mcaweb.dao;

import java.io.Serializable;

import javax.inject.Inject;
import javax.persistence.Query;

import org.mca.mcaweb.entity.Tipodocu;

public class TipodocuDAO implements Serializable {

	private static final long serialVersionUID = -46935803151874134L;

	@Inject
	private DAO<Tipodocu> tipodocuDAO;

	public DAO<Tipodocu> getDAO(){
		return this.tipodocuDAO;
	}
	
	public String obterProximoMoviestoID() {
        Query qry = tipodocuDAO.getEm().createNativeQuery("Select SeqTemp.NextVal as ID from dual");
        return qry.getSingleResult().toString();
    }
}